import request from '@/utils/request'


// 查询换货单列表
export function getBarterOrder(query) {
  return request({
    url: '/basic/warehouse/barterOrder/',
    method: 'get',
    params: query
  })
}


// 查询换货单详情
export function getBarterOrderDetail(query) {
  return request({
    url: '/basic/warehouse/barterOrder/'+query,
    method: 'get'
  })
}



// 删除换货单
export function delBarterOrder(query) {
  return request({
    url: '/basic/warehouse/barterOrder/'+query,
    method: 'delete'
  })
}


// 新增换货单
export function addBarterOrder(query) {
  return request({
    url: '/basic/warehouse/barterOrder/',
    method: 'post',
    data: query
  })
}


// 修改换货单
export function updateBarterOrder(query) {
  return request({
    url: '/basic/warehouse/barterOrder/',
    method: 'put',
    data: query
  })
}


// 确认换货单
export function BarterOrderConfirm(id) {
  return request({
    url: '/basic/warehouse/barterOrder/confirm/'+id,
    method: 'put',
  })
}



